<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>表单数据</h5>
                    <div class="ibox-tools">
                        <a href="javascript:void(0);" class="btn btn-xs btn-default btn-help-detail"  data-type="cst_customer"> <i class="fa fa-question-circle"> 操作说明</i></a>
                    </div>
                </div>
                <div class="ibox-content">
                    <div class="row">
                        <form id="pagerForm" method="post" class="form-inline searchForm">
                            <input type="hidden" name="diy_form_id" value="{$diy_form_id}">
                            <input type="hidden" name="listtype" value="{$listtype}">
                            <div class="col-sm-12">
                                <div class="input-group">
                                    <input type="text" name="keywords" placeholder="输入关键字搜索" class="form-control">
                                </div>
                                <div class="input-group">
                                    <span class="input-group-btn"> <button type="button" class="btn btn-primary ajaxSearchForm"><i class="fa fa-search"></i> 搜索</button></span>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
            <div class="ibox float-e-margins">
                <div class="ibox-content">
                    <div class="row">
                        <div class="col-sm-10 m-b-xs">
                            <lqf_link><a class="btn btn-info ajax-open"  data-url="{:url('WorkflowDiyData/add',array('diy_form_id'=>$diy_form_id))}" data-title="添加" ><i class="fa fa-plus"></i>添加</a></lqf_link>
                        </div>
                        <div class="col-sm-2 text-right">
                            <a href="javascript:void(0);" class="btn btn-default btn-outline btn-field-set" data-id="{$diy_form_id|default=''}"> <i class="fa fa-columns"></i> 列</a>
                        </div>
                    </div>
                </div>
                <div class="ibox-content table-responsive">
                    <table class="table table-hover sorttable ajax-list-table" data-url="{:url('WorkflowDiyData/show')}" width="100%">
                        <thead>
                        <tr>
                            <th width="22"><input type="checkbox" group="ids" class="checkboxCtrl"></th>
                            <th width="22" orderField="id" class="sort-filed"><span>ID</span></th>
                            {notempty name='field_list'}
                            {volist name='field_list' id='vo'}
                            <th width="100" {notempty name="vo.is_list_sort"} {if condition="$vo.is_list_sort" eq '1'} orderField="{$vo.field_name}" class="sort-filed" {/if} {/notempty}>
                            <span>{$vo.show_name}</span>
                            </th>
                            {/volist}
                            {/notempty}
                            <th width="80" class="text-center">状态</th>
                            <th width="80" class="text-center">操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        </tbody>
                        <tfoot class="ibox-content">
                        <tr>
                            <td colspan="7" align="center"></td>
                        </tr>
                        </tfoot>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>
<script id="tableListTpl" type="text/html">
    <% for(var i=0;i<data.length;i++) { %>
    <tr>
        <td><input name="user_id" class="checkboxCtrlId" value="<%=data[i]['id']%>" type="checkbox"></td>
        <td>
            <a class="ajax-open" data-url="{:url('WorkflowDiyData/detail',array('diy_form_id'=>$diy_form_id))}"  data-ids="{'id':'<%=data[i]['id']%>'}">
            <%=data[i]['id']%>
            </a>
        </td>
        {notempty name='field_list'}
        {volist name='field_list' id='vo'}
        <td width="100"><%:=data[i]['{$vo.field_name}']%></th>
        {/volist}
        {/notempty}
        <td class="text-center">
            <a class="ajax-open" data-url="{:url('WorkflowDiyData/audit_detail',array('diy_form_id'=>$diy_form_id))}"  data-ids="{'id':'<%=data[i]['id']%>'}">
            <%:=data[i]['audit_status_arr']['html']%>
        </a>
        </td>
        <td class="text-center">
            <% for(var j=0;j<data[i]['audit_status_arr']['action'].length;j++) { %>
            <lqf_link>
                <a class="<%=data[i]['audit_status_arr']['action'][j]['class']%>" data-ids="{'id':'<%=data[i]['id']%>','diy_form_id':{$diy_form_id}}"
                   href="<%=data[i]['audit_status_arr']['action'][j]['url']%>">
                    <font color="<%=data[i]['audit_status_arr']['action'][j]['color']%>">
                        <%=data[i]['audit_status_arr']['action'][j]['name']%></font>
                </a>
            </lqf_link>
            <% } %>
        </td>
    </tr>
    <% } %>
</script>
<script type="text/javascript">
    $(document).ready(function () {
        turnPage(1);//页面加载时初始化分页
    });
</script>